'''
Created on Apr 3, 2012

@author: michal
'''
import sectionlunchers
import re

    



def lunchApplication(sectionNames):
    for section in sectionNames:
        if re.search('oracle', section):
            sectionlunchers.runOracle(section)
        if re.search('mssql', section, re.IGNORECASE):
            sectionlunchers.runMSSQL(section)
        if re.search('msbatch', section, re.IGNORECASE):
            sectionlunchers.runMSbatch(section)
        if re.search('orabatch', section, re.IGNORECASE):
            sectionlunchers.runOraBatch(section)
        if re.search('grep', section, re.IGNORECASE):
            sectionlunchers.runGrep(section)
        if re.search('sed', section, re.IGNORECASE):
            sectionlunchers.runSed(section)
        if re.search('shellcommand', section, re.IGNORECASE):
            sectionlunchers.runShellCommand(section)

    
if __name__ == '__main__':
    print 'this is luncher'
    func = getattr(sectionlunchers, 'runOracle')
    func()
    
